package com.example.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.util.Date;

@Data
@TableName("message")
public class Message {
    @TableId(type = IdType.AUTO) // 主键策略
    private Integer id;
    private String content;
    private Integer receiverId;//接受者id
    private String receiverType;//接收者类型
    private String type;//业务类型
    private String status;//是否已读
    private Integer typeId;//业务id
    private Date createTime;
    public Message( String receiverType, Integer receiverId, String type, Integer typeId,String content) {
        this.receiverId = receiverId;
        this.receiverType = receiverType;
        this.type = type;
        this.content = content;
        this.typeId = typeId;
        this.createTime = new Date();
        this.status = "0";
    }
}
